package com.xinghou.platform.service.main;

import com.xinghou.platform.model.main.UserRelationFrom;
import com.xinghou.platform.model.main.UserRelationTo;
import org.springframework.dao.DataAccessException;

/**
 * 
 * @author xuzhen
 *
 */
public interface UserRelationService {
	
	/**
	 * 保存关注状态
	 * @param userRelationFrom
	 * @param userRelationTo
	 * @throws DataAccessException
	 */
	public void saveUserRelation(UserRelationFrom userRelationFrom, UserRelationTo userRelationTo) throws DataAccessException;

	/**
	 * 更新关注状态
	 * @param userRelationFrom
	 * @param userRelationTo
	 * @throws DataAccessException
	 */
	public void updateUserRelation(UserRelationFrom userRelationFrom, UserRelationTo userRelationTo) throws DataAccessException;
	
	/**
	 * 获得关注状态 0:未关注 1:以关注 2:表示互相关注 3:表示已关注后取消关注
	 * @param userRelationFrom
	 * @param userRelationTo
	 * @return
	 * @throws DataAccessException
	 */
	public int getUserRelation(UserRelationFrom userRelationFrom, UserRelationTo userRelationTo) throws DataAccessException;

	/**
	 * 获得屏蔽状态 0:未屏蔽 1:以屏蔽 2:表示互相屏蔽 3:表示已屏蔽后取消屏蔽
	 * @param userRelationFrom
	 * @param userRelationTo
	 * @return
	 * @throws DataAccessException
	 */
	public int getUserShields(UserRelationFrom userRelationFrom, UserRelationTo userRelationTo) throws DataAccessException;
}
